package org.teacher.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import org.teacher.entity.Permission;
import org.teacher.service.IPermissionService;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 张老师
 * @since 2024-09-10
 */
@RestController
@CrossOrigin
@RequestMapping("/permission")
public class PermissionController {

    @Autowired  //注入服务层
    private IPermissionService ps;

    //对外提供的接口
    @GetMapping("/list")
    public List<Permission> list(){
        //调用服务ps
        return ps.selectMenu();
    }

}
